package tech.xana.lib.customview;

import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import tech.xana.lib.customview.view.TopBar;

public class MainActivity extends AppCompatActivity {

    private TopBar mTopBar;
    private View mContainer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mTopBar = (TopBar) findViewById(R.id.topBar);
        mContainer = findViewById(R.id.container);
        mTopBar.setOnTopBarClickListener(new TopBar.topbarClickListener() {
            @Override
            public void leftClick() {
                Snackbar.make(mContainer, "Back click!", Snackbar.LENGTH_SHORT).show();
            }

            @Override
            public void rightClick() {
                Snackbar.make(mContainer, "More click!", Snackbar.LENGTH_SHORT).show();
            }
        });
    }
}
